﻿using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;

namespace SilverlightViewport.Common.Interop
{
    [ComImport, 
    Guid("0000010D-0000-0000-C000-000000000046"), 
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IViewObject
    {
        [PreserveSig]
        int Draw([In] uint dwDrawAspect, [In] int lindex, [In] uint pvAspect, [In, MarshalAs(UnmanagedType.LPArray)] DVTARGETDEVICE[] ptd, [In] uint hdcTargetDev, [In] uint hdcDraw, [In, MarshalAs(UnmanagedType.LPArray)] RECTL[] lprcBounds, [In, MarshalAs(UnmanagedType.LPArray)] RECTL[] lprcWBounds, [In, MarshalAs(UnmanagedType.Interface)] IContinue pContinue);
        [PreserveSig]
        int GetColorSet([In] uint dwDrawAspect, [In] int lindex, [In] uint pvAspect, [In, MarshalAs(UnmanagedType.LPArray)] DVTARGETDEVICE[] ptd, [In] uint hicTargetDev, out IntPtr ppColorSet);
        [PreserveSig]
        int Freeze([In] uint dwDrawAspect, [In] int lindex, [In] uint pvAspect, out uint pdwFreeze);
        [PreserveSig]
        int Unfreeze([In] uint dwFreeze);
        [PreserveSig]
        int SetAdvise([In] uint aspects, [In] uint ADVF, [In, MarshalAs(UnmanagedType.Interface)] IAdviseSink pAdvSink);
        [PreserveSig]
        int GetAdvise(out uint pAspects, out uint pAdvf, [MarshalAs(UnmanagedType.Interface)] out IAdviseSink ppAdvSink);
    }
}
